﻿namespace WMS6.Web.Administration
{
    using System;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using WMS6.Web;

    public class SysSettingQuery : BasePage
    {
        protected Button btnExport;
        protected Button btnList;
        protected Button btnNew;
        protected Button btnSearch;
        protected DropDownList ddlSysSettingIDOper;
        protected DropDownList ddlValue;
        protected DropDownList ddlValue_Default;
        protected HtmlForm F1070;
        protected Label lblSys_Setting;
        protected Label lblSysSettingID;
        protected Label lblValue;
        protected Label lblValue_Default;
        protected HtmlLink mycss;
        protected TextBox txtSysSettingID;
        protected TextBox txtValue;
        protected TextBox txtValue_Default;

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            base.Server.Transfer("SysSettingList.aspx", false);
        }

        private void LoadDdl()
        {
            base.InitQueryDDL(this.ddlSysSettingIDOper, 0);
            base.InitQueryDDL(this.ddlValue, 0);
            base.InitQueryDDL(this.ddlValue_Default, 0);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                base.InitPage(this.Page);
                this.LoadDdl();
            }
        }

        public string SysSettingID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtSysSettingID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtSysSettingID.Text.Trim(), this.ddlSysSettingIDOper.SelectedValue);
                }
                return "";
            }
        }

        public string Value
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtValue.Text.Trim()))
                {
                    return base.GetParamsString(this.txtValue.Text.Trim(), this.ddlValue.SelectedValue);
                }
                return "";
            }
        }

        public string ValueDefault
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtValue_Default.Text.Trim()))
                {
                    return base.GetParamsString(this.txtValue_Default.Text.Trim(), this.ddlValue_Default.SelectedValue);
                }
                return "";
            }
        }
    }
}

